import request from '@/utils/request'

// 查询积分兑换记录列表
export function listPointRecord(query) {
  return request({
    url: '/pointRecord/pointRecord/userList',
    method: 'get',
    params: query
  })
}

// 积分兑换商品
export function exchangeProduct(data) {
  return request({
    url: '/pointRecord/pointRecord/exchange',
    method: 'post',
    data: data
  })
}

// 查询物流信息
export function getExpress(id) {
  return request({
    url: '/pointRecord/pointRecord/logistics/' + id,
    method: 'get'
  })
}

// 用户申请退货
export function applyReturn(data) {
  return request({
    url: '/pointRecord/pointRecord/apply',
    method: 'post',
    data: data
  })
}

// 用户取消兑换
export function cancelExchange(data) {
  return request({
    url: '/pointRecord/pointRecord/cancel',
    method: 'post',
    data: data
  })
}

// 查询积分商品退货列表
export function listProductReturn(query) {
  return request({
    url: '/productReturn/productReturn/userList',
    method: 'get',
    params: query
  })
}


